#ifndef __REPULSEFIELD_H__
#define __REPULSEFIELD_H__

#include "vectorfield.h"
#include "World.h"
class RepulseField :
	public VectorField
{
private:
	Vector2 _loc;
	double _radius;
public:
	RepulseField(Vector2 & loc, double radius = -1) : _loc(loc) {
		if (radius < 0) {
			_radius = World::instance()->getShotRange() / 2;
		}
		else {
			_radius = radius;
		}
	}
	RepulseField(VectorField & field, Vector2 & loc)
		: VectorField(field), _loc(loc) {
	}

	~RepulseField(void);

	Vector2 get_trajectory(Vector2 & tank_loc);
};

#endif
